<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Context Free LALR1 compiler: Package contextFree.parser</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="LOGO.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Context Free LALR1 compiler
   &#160;<span id="projectnumber">1.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.html"><span>Packages</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('namespacecontext_free_1_1parser.html','');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a>  </div>
  <div class="headertitle">
<div class="title">Package contextFree.parser</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains class and method for create and initialize grammar parser.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_automa.html">Automa</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_indexed_production.html">IndexedProduction</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">interface &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacecontext_free_1_1parser_1_1_i_parser.html">IParser</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html">LALR1</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_l_r0.html">LR0</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_l_r1.html">LR1</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_parser_factory.html">ParserFactory</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcontext_free_1_1parser_1_1_state.html">State</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Contains class and method for create and initialize grammar parser. </p>
<p>Have been implemented LALR(1) bottom-up parser (<a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html">LALR1</a>) (LR(0) and LR(1) closure and goto have been implemented in respective class) The <a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html">LALR1</a> automaton is constructed through the <a class="el" href="classcontext_free_1_1parser_1_1_l_r0.html">LR0</a> automaton. The lookahead symbols are calculated using an algorithm of "spontaneous generation and propagation of symbols" (see <a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html#aeec32b5c83e031225114f46ac377f804" title="Calculate one step of lookahead symbol from an automaton with the algorithm of spontaneous generation...">LALR1.calculateSymbol(Automa)</a>) When the automaton is constructed, if the grammar is LALR(1) the Action and Goto table are created and stored inside the <a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html">LALR1</a> instance (see <a class="el" href="classcontext_free_1_1parser_1_1_l_a_l_r1.html#a79576626b3b59b832faecc986b293b36" title="builds the Action table GoTo from an automa LALR1 and tells us if it is or not type of LALR1...">LALR1.tableCostruction()</a>).<br/>
</p>
<p>USAGE: You can use the <a class="el" href="classcontext_free_1_1parser_1_1_parser_factory.html">ParserFactory</a> class to obtain an instance:<br/>
 example:<br/>
 1)you can pass a IGrammar grammar...<br/>
 <a class="el" href="classcontext_free_1_1parser_1_1_parser_factory.html">ParserFactory</a> factory = new ParserFactory();<br/>
 <a class="el" href="interfacecontext_free_1_1parser_1_1_i_parser.html">IParser</a> lalr1 = factory.createParsing(IGrammar grammar);<br/>
 <br/>
 2)...or an InputParser instance (contains the path of grammar file, ex."file.4l", and the grammar instance)<br/>
</p>
<p>InputParser parser = new GrammarParser(path);<br/>
 <a class="el" href="classcontext_free_1_1parser_1_1_parser_factory.html">ParserFactory</a> factory = new ParserFactory();<br/>
 <a class="el" href="interfacecontext_free_1_1parser_1_1_i_parser.html">IParser</a> lalr1 = factory.createParser(parser);<br/>
 </p>
</div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>contextFree</b>      </li>
      <li class="navelem"><a class="el" href="namespacecontext_free_1_1parser.html">parser</a>      </li>

    <li class="footer">Generated on Wed Mar 21 2012 19:55:43 for Context Free LALR1 compiler by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
   </ul>
 </div>


</body>
</html>
